--------------------------------------------------------------------------------------------------
      name:  <unnamed>
       log:  /Users/pabloguzmanpinto/Dropbox/PAME 3ie/Do-files/Logs/6_Prepare variables 2013.log
  log type:  text
 opened on:  14 Dec 2015, 15:30:37

. 
. ************************************************************************************************
> ***********     
. *** 0. Renombrar variables 2013 a 2011
. 
. use "${path_data2013}/base2013.dta", clear

. 
. 
. 
. ************************************************************************************************
> ***********     
. *** 1. Creaci�n de variables
. 
. // Consumer price index, depending of month of interview
. 
. gen ipc_nov2009= 99.89 

. gen ipc= 110.65 if date_month==9
(6507 missing values generated)

. replace ipc= 110.80 if date_month ==10 
(1992 real changes made)

. replace ipc= 111.22 if date_month==11
(3016 real changes made)

. replace ipc= 111.88 if (date_month==12 | date_month==1) // interviews in first week of January 2
> 014 are codified to December 2013
(1499 real changes made)

. 
.         
.         ** Labor income
.                 ** Labor income - primary occupation
.                         * Labor income - primary occupation - wage (monthly for wage earners acc
> ording to d15)
.                         quiet gen ya1_sueldo=0 if ind_c2013==1

.                         quiet replace ya1_sueldo= ya1_sueldo + d15m if (d15m!=. & d15m!=88 & d15
> m!=99)

.                         quiet summ d15m if (d15m<=5000 & d15m!=88 & d15m!=99) , de 

.                         quiet gen rest=1 if (d15m==. | d15m==88 | d15m==99)  /*restriction for t
> his variable*/

.                         replace ya1_sueldo =ya1_sueldo+ r(p50) if d15t==1 & rest==1  /*imputatio
> n of median*/
(0 real changes made)

.                         replace ya1_sueldo =ya1_sueldo+ 7500 if d15t==2 & rest==1
(1 real change made)

.                         replace ya1_sueldo=ya1_sueldo+ 12500 if d15t==3 & rest==1
(6 real changes made)

.                         replace ya1_sueldo=ya1_sueldo+ 22500 if d15t==4 & rest==1
(1 real change made)

.                         replace ya1_sueldo= ya1_sueldo + 40000 if d15t==5 & rest==1
(1 real change made)

.                         replace ya1_sueldo=ya1_sueldo+ 75000 if d15t==6 & rest==1
(7 real changes made)

.                         replace ya1_sueldo=ya1_sueldo+ 125000 if d15t==7 & rest==1
(19 real changes made)

.                         replace ya1_sueldo= ya1_sueldo + 175000 if d15t==8 & rest==1
(39 real changes made)

.                         replace ya1_sueldo= ya1_sueldo + 250000 if d15t==9 & rest==1
(60 real changes made)

.                         replace ya1_sueldo= ya1_sueldo + 350000 if d15t==10 & rest==1
(16 real changes made)

.                         replace ya1_sueldo=ya1_sueldo+ 450000 if d15t==11 & rest==1
(6 real changes made)

.                         replace ya1_sueldo=ya1_sueldo+ 550000 if d15t==12 & rest==1
(2 real changes made)

.                         replace ya1_sueldo=ya1_sueldo+ 650000 if d15t==13 & rest==1
(0 real changes made)

.                         replace ya1_sueldo=ya1_sueldo+ 750000 if d15t==14 & rest==1
(0 real changes made)

.                         replace ya1_sueldo=ya1_sueldo+ 850000 if d15t==15 & rest==1
(1 real change made)

.                         replace ya1_sueldo=ya1_sueldo+ 950000 if d15t==16 & rest==1
(0 real changes made)

.                         replace ya1_sueldo=ya1_sueldo+ 1250000 if d15t==17 & rest==1
(0 real changes made)

.                         replace ya1_sueldo=ya1_sueldo+ 2250000 if d15t==18 & rest==1
(0 real changes made)

.                         summ d15m if (d15m>3000000 & d15m!=.) , de 

      D7. El mes pasado, �cu�l fue el sueldo o salario
               l�quido en su ocupaci�n princip
-------------------------------------------------------------
no observations

.                         replace ya1_sueldo=ya1_sueldo+ max(3000000,r(p50)) if d15t==19 & rest==1
>   /*imputation of median or CLP 3000000*/
(0 real changes made)

.                         replace ya1_sueldo=. if rest==1 & (d15t==88 | d15t==99)
(9 real changes made, 9 to missing)

.                         replace ya1_sueldo=. if (d05==3 | d05==4 | d05==6 | d05==7 | d05==9) & d
> 15m==. & d15t==. 
(0 real changes made)

.                         replace ya1_sueldo=0 if d05==8 & ya1_sueldo==.
(0 real changes made)

.                         drop rest

.                         
.                         
.                         * Labor income - primary occupation - business (para indepentents and em
> ployers, variable d16)
.                         quiet gen ya1_negocio=0 if ind_c2013==1

.                         quiet replace ya1_negocio=ya1_negocio + d16m if (d16m!=. & d16m!=88 & d1
> 6m!=99)

.                         quiet summ d16m if (d16m<=5000 & d16m!=88 & d16m!=99) , de 

.                         quiet gen rest=1 if (d16m==. | d16m==88 | d16m==99)

.                         replace ya1_negocio =ya1_negocio+ r(p50) if d16t==1 & rest==1  /*imputat
> ion of median*/
(0 real changes made)

.                         replace ya1_negocio =ya1_negocio+ 7500 if d16t==2 & rest==1
(5 real changes made)

.                         replace ya1_negocio=ya1_negocio + 12500 if d16t==3 & rest==1
(1 real change made)

.                         replace ya1_negocio=ya1_negocio + 22500 if d16t==4 & rest==1
(12 real changes made)

.                         replace ya1_negocio=ya1_negocio + 40000 if d16t==5 & rest==1
(17 real changes made)

.                         replace ya1_negocio=ya1_negocio + 75000 if d16t==6 & rest==1
(26 real changes made)

.                         replace ya1_negocio=ya1_negocio + 125000 if d16t==7 & rest==1
(15 real changes made)

.                         replace ya1_negocio=ya1_negocio + 175000 if d16t==8 & rest==1
(16 real changes made)

.                         replace ya1_negocio= ya1_negocio + 250000 if d16t==9 & rest==1
(10 real changes made)

.                         replace ya1_negocio= ya1_negocio + 350000 if d16t==10 & rest==1
(8 real changes made)

.                         replace ya1_negocio=ya1_negocio+ 450000 if d16t==11 & rest==1
(0 real changes made)

.                         replace ya1_negocio=ya1_negocio+ 550000 if d16t==12 & rest==1
(1 real change made)

.                         replace ya1_negocio=ya1_negocio+ 650000 if d16t==13 & rest==1
(1 real change made)

.                         replace ya1_negocio=ya1_negocio+ 750000 if d16t==14 & rest==1
(0 real changes made)

.                         replace ya1_negocio=ya1_negocio+ 850000 if d16t==15 & rest==1
(0 real changes made)

.                         replace ya1_negocio=ya1_negocio+ 950000 if d16t==16 & rest==1
(0 real changes made)

.                         replace ya1_negocio=ya1_negocio+ 1250000 if d16t==17 & rest==1
(0 real changes made)

.                         replace ya1_negocio=ya1_negocio+ 2250000 if d16t==18 & rest==1
(0 real changes made)

.                         summ d16m if (d16m>3000000 & d16m!=.) , de /*no observations*/

        D8. �Cu�nto dinero retir� el mes pasado de su
             negocio o actividad principal para
-------------------------------------------------------------
no observations

.                         replace ya1_negocio=ya1_negocio+ max(3000000,r(p50)) if d16t==19 & rest=
> =1  /*imputation of median or CLP 3000000*/
(0 real changes made)

.                         replace ya1_negocio=. if rest==1 & (d16t==88 | d16t==99)
(7 real changes made, 7 to missing)

.                         drop rest

.                         replace ya1_negocio=. if (d05==1 | d05==2) & d16m==. & d16t==.
(2 real changes made, 2 to missing)

.                         
.                         
.                         * Labor income - primary occupation - business products withdrew for per
> sonal expenses (for indepentents and employers variable d17)
.                         quiet gen ya1_productos=0 if ind_c2013==1

.                         replace ya1_productos=ya1_productos + d17m if (d17m!=. & d17m!=88 & d17m
> !=99)
(208 real changes made)

.                         quiet summ d17m if (d17m<5000 & d17m!=88 & d17m!=99) , de

.                         qui gen rest = 1 if (d17m==. | d17m==88 | d17m==99)

.                         replace ya1_productos =ya1_productos+ r(p50) if d17t==1 & rest==1  /*imp
> utation of median*/
(0 real changes made)

.                         replace ya1_productos =ya1_productos + 7500 if d17t==2 & rest==1
(4 real changes made)

.                         replace ya1_productos =ya1_productos + 12500 if d17t==3 & rest==1
(1 real change made)

.                         replace ya1_productos=ya1_productos + 22500 if d17t==4 & rest==1
(9 real changes made)

.                         replace ya1_productos=ya1_productos + 40000 if d17t==5 & rest==1
(7 real changes made)

.                         replace ya1_productos=ya1_productos + 75000 if d17t==6 & rest==1
(5 real changes made)

.                         replace ya1_productos=ya1_productos + 125000 if d17t==7 & rest==1
(2 real changes made)

.                         replace ya1_productos=ya1_productos + 175000 if d17t==8 & rest==1
(1 real change made)

.                         replace ya1_productos= ya1_productos + 250000 if d17t==9 & rest==1
(3 real changes made)

.                         replace ya1_productos=ya1_productos + 350000 if d17t==10 & rest==1
(0 real changes made)

.                         replace ya1_productos=ya1_productos+ 450000 if d17t==11 & rest==1
(0 real changes made)

.                         replace ya1_productos=ya1_productos+ 550000 if d17t==12 & rest==1
(0 real changes made)

.                         replace ya1_productos=ya1_productos+ 650000 if d17t==13 & rest==1
(0 real changes made)

.                         replace ya1_productos=ya1_productos+ 750000 if d17t==14 & rest==1
(0 real changes made)

.                         replace ya1_productos=ya1_productos+ 850000 if d17t==15 & rest==1
(0 real changes made)

.                         replace ya1_productos=ya1_productos+ 950000 if d17t==16 & rest==1
(0 real changes made)

.                         replace ya1_productos=ya1_productos+ 1250000 if d17t==17 & rest==1
(0 real changes made)

.                         replace ya1_productos=ya1_productos+ 2250000 if d17t==18 & rest==1
(0 real changes made)

.                         quiet summ d17m if (d17m>3000000 & d17m!=.) , de 

.                         quiet replace ya1_productos=ya1_productos+ max(3000000,r(p50)) if d17t==
> 19 & rest==1  /*imputation of median or CLP 3000000*/

.                         replace ya1_productos=. if rest==1 & (d17t==88 | d17t==99)
(2 real changes made, 2 to missing)

.                         drop rest

.                         replace ya1_productos=. if (d05==1 | d05==2) & d17m==. & d17t==. 
(58 real changes made, 58 to missing)

.                 
.                 
.                 ** Labor income - secondary occupation
.                         * Labor income - secondary occupation - wage (monthly for wage earners a
> ccording to d28)
.                         quiet gen ya2_sueldo=0 if ind_c2013==1

.                         quiet replace ya2_sueldo= ya2_sueldo + d28m if (d28m!=. & d28m!=88 & d28
> m!=99)

.                         quiet summ d28m if (d28m<5000 & d28m!=88 & d28m!=99) , de

.                         qui gen rest = 1 if (d28m==. | d28m==88 | d28m==99)

.                         quiet replace ya2_sueldo =ya2_sueldo+ r(p50) if d28t==1 & rest==1  /*imp
> utation of median*/

.                         quiet replace ya2_sueldo =ya2_sueldo + 7500 if d28t==2 & rest==1

.                         quiet replace ya2_sueldo =ya2_sueldo + 12500 if d28t==3 & rest==1

.                         quiet replace ya2_sueldo=ya2_sueldo + 22500 if d28t==4 & rest==1

.                         quiet replace ya2_sueldo=ya2_sueldo + 40000 if d28t==5 & rest==1

.                         quiet replace ya2_sueldo=ya2_sueldo + 75000 if d28t==6 & rest==1

.                         quiet replace ya2_sueldo=ya2_sueldo + 125000 if d28t==7 & rest==1

.                         quiet replace ya2_sueldo=ya2_sueldo + 175000 if d28t==8 & rest==1

.                         quiet replace ya2_sueldo= ya2_sueldo + 250000 if d28t==9 & rest==1

.                         quiet replace ya2_sueldo=ya2_sueldo + 350000 if d28t==10 & rest==1

.                         quiet replace ya2_sueldo=ya2_sueldo+ 450000 if d28t==11 & rest==1

.                         quiet replace ya2_sueldo=ya2_sueldo+ 550000 if d28t==12 & rest==1

.                         quiet replace ya2_sueldo=ya2_sueldo+ 650000 if d28t==13 & rest==1

.                         quiet replace ya2_sueldo=ya2_sueldo+ 750000 if d28t==14 & rest==1

.                         quiet replace ya2_sueldo=ya2_sueldo+ 850000 if d28t==15 & rest==1

.                         quiet replace ya2_sueldo=ya2_sueldo+ 950000 if d28t==16 & rest==1

.                         quiet replace ya2_sueldo=ya2_sueldo+ 1250000 if d28t==17 & rest==1

.                         quiet replace ya2_sueldo=ya2_sueldo+ 2250000 if d28t==18 & rest==1

.                         quiet summ d28m if (d28m>3000000 & d28m!=.) , de 

.                         quiet replace ya2_sueldo=ya2_sueldo+ max(3000000,r(p50)) if d28t==19 & r
> est==1  /*imputation of median or CLP 3000000*/

.                         replace ya2_sueldo=. if rest==1 & (d28t==88 | d28t==99)
(0 real changes made)

.                         replace ya2_sueldo=. if (d18==3 | d18==4 | d18==5 | d18==6 | d18==7 | d1
> 8==9 ) & d28m==. & d28t==.
(0 real changes made)

.                         replace ya2_sueldo=0 if d18==8 & ya2_sueldo==.
(0 real changes made)

.                         drop rest

.                         
.                         
.                         * Labor income - secondary occupation - business (para indepentents and 
> employers, variable d29)
.                         quiet gen ya2_negocio=0 if ind_c2013==1

.                         quiet summ d29m if (d18==1 | d18==2) , de

.                         quiet replace ya2_negocio = ya2_negocio + d29m if (d29m!=. & d29m!=88 & 
> d29m!=99)

.                         quiet summ d29m if (d29m<5000 & d29m!=88 & d29m!=99) , de

.                         quiet gen rest=1 if (d29m==. | d29m==88 | d29m==99)

.                         quiet replace ya2_negocio =ya2_negocio+ r(p50) if d29t==1 & rest==1  /*i
> mputation of median*/

.                         quiet replace ya2_negocio =ya2_negocio + 7500 if d29t==2 & rest==1

.                         quiet replace ya2_negocio =ya2_negocio + 12500 if d29t==3 & rest==1

.                         quiet replace ya2_negocio=ya2_negocio + 22500 if d29t==4 & rest==1

.                         quiet replace ya2_negocio=ya2_negocio + 40000 if d29t==5 & rest==1

.                         quiet replace ya2_negocio=ya2_negocio + 75000 if d29t==6 & rest==1

.                         quiet replace ya2_negocio=ya2_negocio + 125000 if d29t==7 & rest==1

.                         quiet replace ya2_negocio=ya2_negocio + 175000 if d29t==8 & rest==1

.                         quiet replace ya2_negocio= ya2_negocio + 250000 if d29t==9 & rest==1

.                         quiet replace ya2_negocio=ya2_negocio + 350000 if d29t==10 & rest==1

.                         quiet replace ya2_negocio=ya2_negocio+ 450000 if d29t==11 & rest==1

.                         quiet replace ya2_negocio=ya2_negocio+ 550000 if d29t==12 & rest==1

.                         quiet replace ya2_negocio=ya2_negocio+ 650000 if d29t==13 & rest==1

.                         quiet replace ya2_negocio=ya2_negocio+ 750000 if d29t==14 & rest==1

.                         quiet replace ya2_negocio=ya2_negocio+ 850000 if d29t==15 & rest==1

.                         quiet replace ya2_negocio=ya2_negocio+ 950000 if d29t==16 & rest==1

.                         quiet replace ya2_negocio=ya2_negocio+ 1250000 if d29t==17 & rest==1

.                         quiet replace ya2_negocio=ya2_negocio+ 2250000 if d29t==18 & rest==1

.                         quiet summ d29m if (d29m>3000000 & d29m!=.) , de 

.                         quiet replace ya2_negocio=ya2_negocio+ max(3000000,r(p50)) if d29t==19 &
>  rest==1  /*imputation of median or CLP 3000000*/

.                         replace ya2_negocio=. if rest==1 & (d29t==88 | d29t==99)
(3 real changes made, 3 to missing)

.                         replace ya2_negocio=. if (d18==1 | d18==2) & d29m==. & d29t==.
(0 real changes made)

.                         drop rest

.                         
.                         * Labor income - secondary occupation - business products withdrew for p
> ersonal expenses (for indepentents and employers variable d30)
.                         quiet gen ya2_productos=0 if ind_c2013==1

.                         quiet replace ya2_productos = ya2_productos + d30m if (d30m!=. & d30m!=8
> 8 & d30m!=99)

.                         quiet summ d30m if (d30m<5000 & d30m!=88 & d30m!=99) , de

.                         quiet gen rest=1 if (d30m==. | d30m==88 | d30m==99)

.                         quiet replace ya2_productos =ya2_productos+ r(p50) if d30t==1 & rest==1 
>  /*imputation of median*/

.                         quiet replace ya2_productos =ya2_productos + 7500 if d30t==2 & rest==1

.                         quiet replace ya2_productos =ya2_productos + 12500 if d30t==3 & rest==1

.                         quiet replace ya2_productos=ya2_productos + 22500 if d30t==4 & rest==1

.                         quiet replace ya2_productos=ya2_productos + 40000 if d30t==5 & rest==1

.                         quiet replace ya2_productos=ya2_productos + 75000 if d30t==6 & rest==1

.                         quiet replace ya2_productos=ya2_productos + 125000 if d30t==7 & rest==1

.                         quiet replace ya2_productos=ya2_productos + 175000 if d30t==8 & rest==1

.                         quiet replace ya2_productos=ya2_productos + 250000 if d30t==9 & rest==1

.                         quiet replace ya2_productos=ya2_productos + 350000 if d30t==10 & rest==1

.                         quiet replace ya2_productos=ya2_productos+ 450000 if d30t==11 & rest==1

.                         quiet replace ya2_productos=ya2_productos+ 550000 if d30t==12 & rest==1

.                         quiet replace ya2_productos=ya2_productos+ 650000 if d30t==13 & rest==1

.                         quiet replace ya2_productos=ya2_productos+ 750000 if d30t==14 & rest==1

.                         quiet replace ya2_productos=ya2_productos+ 850000 if d30t==15 & rest==1

.                         quiet replace ya2_productos=ya2_productos+ 950000 if d30t==16 & rest==1

.                         quiet replace ya2_productos=ya2_productos+ 1250000 if d30t==17 & rest==1

.                         quiet replace ya2_productos=ya2_productos+ 2250000 if d30t==18 & rest==1

.                         quiet summ d30m if (d30m>3000000 & d30m!=.) , de 

.                         quiet replace ya2_productos=ya2_productos+ max(3000000,r(p50)) if d30t==
> 19 & rest==1  /*imputation of median or CLP 3000000*/

.                         replace ya2_productos=. if rest==1 & (d30t==88 | d30t==99)
(2 real changes made, 2 to missing)

.                         drop rest

.                         replace ya2_productos=. if (d18==1 | d18==2) & d30m==. & d30t==.
(2 real changes made, 2 to missing)

.                 
.                 
.                 ** Imputation of missing values for observations with no information on work var
> iables (d01, d02, d03)
.                 foreach x in ya1_sueldo ya1_negocio ya1_productos ya2_sueldo ya2_negocio ya2_pro
> ductos {
  2.                         replace `x' = . if ((d01!=1 & d01!=2) & (d02!=1 & d02!=2) & (d03!=1 &
>  d03!=2)) ///
>                                                                 | ((d01==2) & (d02!=1 & d02!=2) 
> & (d03!=1 & d03!=2)) ///
>                                                                 | ((d01==2) & (d02==2) & (d03!=1
>  & d03!=2)) 
  3.                 }                                       
(2168 real changes made, 2168 to missing)
(2168 real changes made, 2168 to missing)
(2168 real changes made, 2168 to missing)
(2168 real changes made, 2168 to missing)
(2168 real changes made, 2168 to missing)
(2168 real changes made, 2168 to missing)

.                 
.                 
.                 ** Grouping of income coming from primary and secondary occupation
.                 for any 1 2 : egen yaX=  rsum(yaX_sueldo yaX_negocio yaX_productos) if yaX_sueld
> o!=. | yaX_negocio!=. | yaX_productos!=.

->  egen ya1= rsum(ya1_sueldo ya1_negocio ya1_productos) if ya1_sueldo!=. | ya1_negocio!=. | ya1_p
> roductos!=.
(2168 missing values generated)

->  egen ya2= rsum(ya2_sueldo ya2_negocio ya2_productos) if ya2_sueldo!=. | ya2_negocio!=. | ya2_p
> roductos!=.
(2168 missing values generated)

.                 egen ylaborales = rsum(ya1 ya2) if ya1!=. | ya2!=.
(2168 missing values generated)

.                 replace ylaborales=. if ya1_negocio==. &  ya1_productos==. & (d18==10 | d18==99)
(5 real changes made, 5 to missing)

.                 replace ylaborales=. if ya1_negocio==. &  ya1_productos==. & ya2_negocio==. & ya
> 2_productos==.
(0 real changes made)

.                 replace ylaborales=. if ya1_sueldo==. & (d18==10 | d18==99)
(9 real changes made, 9 to missing)

.                 replace ylaborales=. if ya1_sueldo==. & ya2_sueldo==.
(0 real changes made)

. 
.                 
.                 ** Income coming from dependent and independent activities              
.                 egen ydeptes= rsum(ya1_sueldo ya2_sueldo) if (ya1_sueldo!=. | ya2_sueldo!=.)
(2168 missing values generated)

.                 replace ydeptes=. if ya1_sueldo==. & (d18==10 | d18==99)
(9 real changes made, 9 to missing)

.                 replace ydeptes=. if ya1_sueldo==. & ya2_sueldo==.
(0 real changes made)

.                  
.                 egen yindeptes= rsum(ya1_negocio  ya1_productos ya2_negocio  ya2_productos ) if 
> ya1_negocio!=. | ya1_productos!=. | ya2_negocio!=. |  ya2_productos!=.
(2168 missing values generated)

.                 replace yindeptes=. if ya1_negocio==. & ya1_productos==. & (d18==10 | d18==99)
(5 real changes made, 5 to missing)

.                 replace yindeptes=. if ya1_negocio==. & ya1_productos==. & ya2_negocio==. & ya2_
> productos==.
(0 real changes made)

.                 
.                 
.         
.         ** Conversion of monetary variables to November 2009 chilean pesos
.         foreach y in ya1_sueldo ya1_negocio ya1_productos ya2_sueldo ya2_negocio ya2_productos y
> a1 ya2 ylaborales ydeptes yindeptes {
  2.                 replace `y'=`y'*(ipc_nov2009/ipc)
  3.         }
(1465 real changes made)
(886 real changes made)
(240 real changes made)
(43 real changes made)
(161 real changes made)
(44 real changes made)
(2360 real changes made)
(206 real changes made)
(2367 real changes made)
(1500 real changes made)
(983 real changes made)

.         
.         
.         *** Wage employment, Self-employment and Employment (defined by income of those activiti
> es)
.         gen dependiente = (ydeptes>0) if ind_c2013==1 & ydeptes!=. & yindeptes!=.
(2182 missing values generated)

.         gen independiente = (yindeptes>0) if ind_c2013==1 & ydeptes!=. & yindeptes!=.
(2182 missing values generated)

.         gen trabaja=(ylaborales>0) if ylaborales!=.
(2182 missing values generated)

.         
.         
.         ** Weekly hours worked
.         gen ht=0 if ind_c2013==1

.         replace ht=d06 if d06!=88 & d06!=99 & d06!=. & ind_c2013==1
(2665 real changes made)

.         replace ht=ht+d19 if d19!=88 & d19!=99 & d19!=. & ind_c2013==1
(213 real changes made)

.     replace ht=.        if (d06==88 | d06==99) & (d19==88 | d19==99 | d19==.)
(65 real changes made, 65 to missing)

. 
.         
.         ** Demographics
.         
.         ** Age
.         gen edad =  a03 
(3 missing values generated)

.         
.         
.         ** Gender (1 male, 0 female) 
.         generate sexo= a02

.         recode sexo (2 = 0)
(sexo: 3946 changes made)

.         label define sexolbl 1 "Male" 0 "Female"

.         label values sexo sexolbl

.         label var sexo "Dummy Gender (1=Male)"

.         
.         
. 
. **********************************************
.         *********Business Practices**************
.         **********************************************
.         
. ** Marketing
. 
. local i=1

. foreach item in 01a 01b 01c 01d 01e 02 03 04 07 {
  2. 
. gen prac_m`i'=0 if ind_c2013==1
  3. replace prac_m`i'=1 if m`item'==1
  4. replace prac_m`i'=. if (m`item'==88 | m`item'==99)
  5. 
. local i=`i'+1
  6. }
(1558 real changes made)
(0 real changes made)
(1524 real changes made)
(0 real changes made)
(1735 real changes made)
(0 real changes made)
(579 real changes made)
(4 real changes made, 4 to missing)
(1455 real changes made)
(0 real changes made)
(1319 real changes made)
(0 real changes made)
(1904 real changes made)
(1 real change made, 1 to missing)
(1109 real changes made)
(0 real changes made)
(2199 real changes made)
(5 real changes made, 5 to missing)

. 
. egen marketing=rsum(prac_m1 prac_m2 prac_m3 prac_m4 prac_m5 prac_m6 prac_m7 prac_m8 prac_m9) if 
> ind_c2013==1

. replace marketing=. if (prac_m1==. & prac_m2==. & prac_m3==. & prac_m4==. & prac_m5==. & prac_m6
> ==. & prac_m7==. & prac_m8==. & prac_m9==.)
(0 real changes made)

. 
. 
. ** Inventory management
. 
. local i=1

. foreach item in 08 09 10 15 17 {
  2. 
. gen prac_s`i'=0 if ind_c2013==1
  3. replace prac_s`i'=1 if m`item'==1
  4. replace prac_s`i'=. if (m`item'==88 | m`item'==99)
  5. 
. local i=`i'+1
  6. }
(1362 real changes made)
(36 real changes made, 36 to missing)
(1940 real changes made)
(36 real changes made, 36 to missing)
(1462 real changes made)
(15 real changes made, 15 to missing)
(945 real changes made)
(0 real changes made)
(142 real changes made)
(0 real changes made)

. 
. egen stock=rsum(prac_s1 prac_s2 prac_s3 prac_s4 prac_s5 ) if ind_c2013==1

. replace stock=. if (prac_s1==. & prac_s2==. & prac_s3==. & prac_s4==. & prac_s5==.)
(0 real changes made)

. 
. 
. ** Costing and record keeping
. 
. local i=1 

. 
. foreach item in 18 19 20 21 22 23 25 {
  2. 
. gen prac_c`i'=0 if ind_c2013==1
  3. replace prac_c`i'=1 if m`item'==1
  4. replace prac_c`i'=. if (m`item'==88 | m`item'==99)
  5. 
. local i=`i'+1
  6. 
. }
(1561 real changes made)
(6 real changes made, 6 to missing)
(1386 real changes made)
(7 real changes made, 7 to missing)
(1248 real changes made)
(15 real changes made, 15 to missing)
(2259 real changes made)
(43 real changes made, 43 to missing)
(2673 real changes made)
(64 real changes made, 64 to missing)
(1067 real changes made)
(61 real changes made, 61 to missing)
(954 real changes made)
(43 real changes made, 43 to missing)

. 
. egen cost=rsum(prac_c1 prac_c2 prac_c3 prac_c4 prac_c5  prac_c6 prac_c7) if ind_c2013==1

. replace cost=. if (prac_c1==. & prac_c2==. & prac_c3==. & prac_c4==. & prac_c5==. & prac_c6==. &
>  prac_c7==.)
(0 real changes made)

. 
. ** Financial planning
. 
. local i=1 

. foreach item in 27 28  {
  2. gen prac_p`i'=0 if ind_c2013==1
  3. replace prac_p`i'=1 if m`item'==1
  4. replace prac_p`i'=. if (m`item'==88 | m`item'==99)
  5. 
. local i=`i'+1
  6. }
(1905 real changes made)
(19 real changes made, 19 to missing)
(943 real changes made)
(15 real changes made, 15 to missing)

. 
. gen prac_p3=1 if m26==4  
(5642 missing values generated)

. replace prac_p3=. if ( m26==88 | m26==99) 
(0 real changes made)

.  
. gen prac_p4=1 if (m29a==1 | m29b==1 | m29c==1 | m29d==1 ) 
(6097 missing values generated)

. replace prac_p4=. if (m29a==. & m29b==. & m29c==. & m29d==.) 
(0 real changes made)

. 
. egen plan=rsum(prac_p1 prac_p2 prac_p3 prac_p4 ) 

. replace plan=. if (prac_p1==. & prac_p2==. & prac_p3==. & prac_p4==. ) 
(7 real changes made, 7 to missing)

. 
. 
. ** Business practices
. 
. egen tot_practics=rsum(marketing stock cost plan) if ind_c2013==1

. replace tot_practics=. if (marketing==. & stock==. & cost==. & plan==. ) 
(0 real changes made)

. 
. 
. *** Registry book available
. gen ver_registro=1 if m34==1
(6643 missing values generated)

. recode ver_registro .=0
(ver_registro: 6643 changes made)

. replace ver_registro=. if (m34==88 | m34==99)
(0 real changes made)

. 
. *** Inventory available
. gen ver_inven=1 if m35==1
(6784 missing values generated)

. recode ver_inven .=0
(ver_inven: 6784 changes made)

. replace ver_inven=. if (m35==88 | m35==99)
(2 real changes made, 2 to missing)

. 
. ** Available cash (CLP)
. gen dinero_mano= m30
(3947 missing values generated)

. recode dinero_mano .=0
(dinero_mano: 3947 changes made)

. replace dinero_mano=. if (m30==88 | m30==99)
(191 real changes made, 191 to missing)

. 
. 
. *** Correction of response rates
. *** Variable that identifies self-employment or employers (primary or secondary occupation)
. gen cta_prop=1 if d05==1 | d05==2
(6141 missing values generated)

. replace cta_prop=1 if d18==1 | d18==2
(98 real changes made)

. recode cta_prop .=0
(cta_prop: 6043 changes made)

. 
. *** Variable that identifies who answers Modules G and M of the questionnaire
. gen emprendedor=1 if g01==1
(3944 missing values generated)

. recode emprendedor .=0
(emprendedor: 3944 changes made)

. 
. *** Indicator if responder in Module G, but no independent worker
. gen no_ind_si_emprende=1 if cta_prop==0 & emprendedor==1
(4860 missing values generated)

. recode no_ind_si_emprende .=0
(no_ind_si_emprende: 4860 changes made)

. 
. *** Indicator if not responder in Module G, but independent worker
. 
. gen si_ind_no_emprende=1 if cta_prop==1 & emprendedor==0
(6959 missing values generated)

. recode si_ind_no_emprende .=0
(si_ind_no_emprende: 6959 changes made)

. 
. *** Correction of response rates in business practices
. 
. replace marketing =0 if no_ind_si_emprende==1 & marketing!=. & ind_c2013==1
(2023 real changes made)

. replace stock =0 if no_ind_si_emprende==1 & stock!=.  & ind_c2013==1
(1681 real changes made)

. replace cost =0 if no_ind_si_emprende==1 & cost!=. & ind_c2013==1
(2001 real changes made)

. replace plan=0 if no_ind_si_emprende==1 & plan!=. & ind_c2013==1
(1734 real changes made)

. replace tot_practics=0 if no_ind_si_emprende==1 & tot_practics!=. & ind_c2013==1
(2178 real changes made)

. replace ver_registro=0 if no_ind_si_emprende==1 & ver_registro!=. & ind_c2013==1
(348 real changes made)

. replace ver_inven=0 if no_ind_si_emprende==1 & ver_inven!=. & ind_c2013==1
(250 real changes made)

. replace dinero_mano=0 if no_ind_si_emprende==1 & dinero_mano!=. & ind_c2013==1
(1701 real changes made)

. 
. 
. 
. 
. *************************
. *** Assets **************
. *************************
. 
. 
. ** Household assets
.         foreach activo of numlist 1/12 { 
  2.                 gen activo`activo'= i01_`activo'cm if i01_`activo'a==1 & (i01_`activo'b!=. & 
> i01_`activo'b!=88 & i01_`activo'b!=99) & (i01_`activo'c!=. & i01_`activo'c!=88 & i01_`activo'c!=
> 99)
  3.                 replace activo`activo'=0 if i01_`activo'a==2
  4.                 
.                 **** When bracket is reported
.                         quiet summ i01_`activo'cm if (i01_`activo'cm<=5000 & i01_`activo'cm!=88 
> & i01_`activo'cm!=99) , de 
  5.                         quiet gen rest=1 if (i01_`activo'cm==. | i01_`activo'cm==88 | i01_`ac
> tivo'cm==99)  /*restriction for this variable*/
  6.                         replace activo`activo' =r(p50) if i01_`activo't==1 & rest==1  /*imput
> ation of mean*/
  7.                         replace activo`activo' = 7500 if i01_`activo't==2 & rest==1
  8.                         replace activo`activo'= 12500 if i01_`activo't==3 & rest==1
  9.                         replace activo`activo'= 22500 if i01_`activo't==4 & rest==1
 10.                         replace activo`activo'= 40000 if i01_`activo't==5 & rest==1
 11.                         replace activo`activo'= 75000 if i01_`activo't==6 & rest==1
 12.                         replace activo`activo'= 125000 if i01_`activo't==7 & rest==1
 13.                         replace activo`activo'= 175000 if i01_`activo't==8 & rest==1
 14.                         replace activo`activo'= 250000 if i01_`activo't==9 & rest==1
 15.                         replace activo`activo'= 350000 if i01_`activo't==10 & rest==1
 16.                         replace activo`activo'= 450000 if i01_`activo't==11 & rest==1
 17.                         replace activo`activo'= 550000 if i01_`activo't==12 & rest==1
 18.                         replace activo`activo'= 650000 if i01_`activo't==13 & rest==1
 19.                         replace activo`activo'= 750000 if i01_`activo't==14 & rest==1
 20.                         replace activo`activo'= 850000 if i01_`activo't==15 & rest==1
 21.                         replace activo`activo'= 950000 if i01_`activo't==16 & rest==1
 22.                         replace activo`activo'= 1250000 if i01_`activo't==17 & rest==1
 23.                         replace activo`activo'= 2250000 if i01_`activo't==18 & rest==1
 24.                         summ i01_`activo'cm if (i01_`activo'cm>3000000 & i01_`activo'cm!=.) ,
>  de 
 25.                         replace activo`activo'= max(3000000,r(p50)) if i01_`activo't==19 & re
> st==1  /*imputation of mean or CLP 3000000*/
 26.                         drop rest
 27.                 
.                         }
(6192 missing values generated)
(6033 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(4 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(2 real changes made)
(4 real changes made)
(0 real changes made)
(5 real changes made)
(30 real changes made)
(42 real changes made)

      I1_C1  (Veh�culo de uso particular (incluye autos
               y motos)) Si tuviera que vende
-------------------------------------------------------------
      Percentiles      Smallest
 1%      3500000        3500000
 5%      3500000        3500000
10%      3500000        3500000       Obs                 208
25%      4000000        3500000       Sum of Wgt.         208

50%      4500000                      Mean            5484135
                        Largest       Std. Dev.       2661006
75%      6000000       1.50e+07
90%      8000000       1.50e+07       Variance       7.08e+12
95%     1.40e+07       1.50e+07       Skewness       2.414991
99%     1.50e+07       1.50e+07       Kurtosis       8.451621
(45 real changes made)
(1873 missing values generated)
(1238 real changes made)
(13 real changes made)
(17 real changes made)
(42 real changes made)
(49 real changes made)
(111 real changes made)
(224 real changes made)
(61 real changes made)
(27 real changes made)
(0 real changes made)
(4 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)

      I1_C2 (Lavadora autom�tica) Si tuviera que vender
               este bien, �cu�nto podr�a obte
-------------------------------------------------------------
no observations
(0 real changes made)
(1359 missing values generated)
(639 real changes made)
(7 real changes made)
(16 real changes made)
(37 real changes made)
(68 real changes made)
(147 real changes made)
(179 real changes made)
(84 real changes made)
(32 real changes made)
(7 real changes made)
(6 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)

       I1_C3 (Refrigerador) Si tuviera que vender este
              bien, �cu�nto podr�a obtener por
-------------------------------------------------------------
no observations
(0 real changes made)
(2645 missing values generated)
(1989 real changes made)
(16 real changes made)
(62 real changes made)
(86 real changes made)
(95 real changes made)
(123 real changes made)
(98 real changes made)
(7 real changes made)
(23 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)

      I1_C4  (Calef�n) Si tuviera que vender este bien,
               �cu�nto podr�a obtener por �l?
-------------------------------------------------------------
no observations
(0 real changes made)
(1389 missing values generated)
(745 real changes made)
(54 real changes made)
(60 real changes made)
(74 real changes made)
(108 real changes made)
(122 real changes made)
(60 real changes made)
(32 real changes made)
(24 real changes made)
(5 real changes made)
(5 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)

       I1_C5  (Tel�fono Celular) Si tuviera que vender
              este bien, �cu�nto podr�a obtene
-------------------------------------------------------------
no observations
(0 real changes made)
(3869 missing values generated)
(3387 real changes made)
(0 real changes made)
(0 real changes made)
(27 real changes made)
(32 real changes made)
(31 real changes made)
(97 real changes made)
(66 real changes made)
(75 real changes made)
(42 real changes made)
(5 real changes made)
(5 real changes made)
(5 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)

     I1_C6  (Computador/notebook/Tablet) Si tuviera que
                vender este bien, �cu�nto pod
-------------------------------------------------------------
no observations
(0 real changes made)
(929 missing values generated)
(93 real changes made)
(10 real changes made)
(23 real changes made)
(25 real changes made)
(43 real changes made)
(129 real changes made)
(138 real changes made)
(159 real changes made)
(71 real changes made)
(61 real changes made)
(33 real changes made)
(22 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)

        I1_C7 (Televisior) Si tuviera que vender este
             bien, �cu�nto podr�a obtener por �
-------------------------------------------------------------
no observations
(0 real changes made)
(1085 missing values generated)
(351 real changes made)
(14 real changes made)
(53 real changes made)
(34 real changes made)
(121 real changes made)
(119 real changes made)
(148 real changes made)
(71 real changes made)
(47 real changes made)
(0 real changes made)
(3 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)

       I1_C8  (Cocina y/o horno) Si tuviera que vender
              este bien, �cu�nto podr�a obtene
-------------------------------------------------------------
no observations
(0 real changes made)
(2608 missing values generated)
(1984 real changes made)
(32 real changes made)
(22 real changes made)
(79 real changes made)
(99 real changes made)
(120 real changes made)
(129 real changes made)
(15 real changes made)
(18 real changes made)
(11 real changes made)
(6 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)

       I1_C9  (Equipo de m�sica/Radio) Si tuviera que
              vender este bien, �cu�nto podr�a
-------------------------------------------------------------
no observations
(0 real changes made)
(3765 missing values generated)
(3316 real changes made)
(69 real changes made)
(60 real changes made)
(115 real changes made)
(114 real changes made)
(34 real changes made)
(19 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)

      I1_C10   (DVD/Blu-Ray) Si tuviera que vender este
               bien, �cu�nto podr�a obtener p
-------------------------------------------------------------
no observations
(0 real changes made)
(3093 missing values generated)
(2568 real changes made)
(27 real changes made)
(98 real changes made)
(119 real changes made)
(101 real changes made)
(92 real changes made)
(13 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)

     I1_C11    (Horno Microondas) Si tuviera que vender
                este bien, �cu�nto podr�a obt
-------------------------------------------------------------
no observations
(0 real changes made)
(5876 missing values generated)
(5631 real changes made)
(0 real changes made)
(5 real changes made)
(10 real changes made)
(29 real changes made)
(13 real changes made)
(38 real changes made)
(44 real changes made)
(19 real changes made)
(21 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)

       I1_C12  (Consola de juegos (PlayStation, Xbox,
              etc.) Si tuviera que vender este
-------------------------------------------------------------
no observations
(0 real changes made)

.         egen activos= rsum(activo1 activo2 activo3 activo4 activo5 activo6 activo7 activo8 activ
> o9 activo10 activo11 activo12) if activo1!=. | activo2!=. | activo3!=. | activo4!=. | activo5!=.
>  | activo6!=. | activo7!=. | activo8!=. | activo9!=. | activo10!=. | activo11!=. | activo12!=.

. 
. 
. ** Business assets
. 
.         foreach activo in a b c d e f g h i j k l  {
  2. 
.                 gen activo_n1`activo'= h05_1`activo' if h05_1`activo'!=. & h05_1`activo'!=88 & h
> 05_1`activo'!=99 
  3.                 replace activo_n1`activo'=0 if h01`activo'==2
  4.                 replace activo_n1`activo'=0 if h03_1`activo'==2
  5.                 
.                 gen activo_n2`activo'= 0 if h05_2`activo'!=88 & h05_2`activo'!=99 
  6.                 replace activo_n2`activo'= h05_2`activo' if h05_2`activo'!=. & h05_2`activo'!
> =88 & h05_2`activo'!=99 
  7.                 replace activo_n2`activo'=0 if h01`activo'==2
  8.                 replace activo_n2`activo'=0 if h03_2`activo'==2
  9. 
.                 gen montoactivo`activo'=activo_n1`activo'+ activo_n2`activo'
 10.                 
.                 }
(6690 missing values generated)
(2709 real changes made)
(0 real changes made)
(5 missing values generated)
(33 real changes made)
(0 real changes made)
(0 real changes made)
(3981 missing values generated)
(5298 missing values generated)
(1195 real changes made)
(19 real changes made)
(9 missing values generated)
(153 real changes made)
(0 real changes made)
(0 real changes made)
(4084 missing values generated)
(6602 missing values generated)
(2572 real changes made)
(0 real changes made)
(5 missing values generated)
(90 real changes made)
(0 real changes made)
(0 real changes made)
(4030 missing values generated)
(6286 missing values generated)
(2265 real changes made)
(6 real changes made)
(13 missing values generated)
(315 real changes made)
(0 real changes made)
(0 real changes made)
(4021 missing values generated)
(6740 missing values generated)
(2761 real changes made)
(7 real changes made)
(5 missing values generated)
(5 real changes made)
(0 real changes made)
(0 real changes made)
(3979 missing values generated)
(6684 missing values generated)
(2696 real changes made)
(3 real changes made)
(5 missing values generated)
(52 real changes made)
(0 real changes made)
(0 real changes made)
(3985 missing values generated)
(6693 missing values generated)
(2725 real changes made)
(0 real changes made)
(4 missing values generated)
(85 real changes made)
(0 real changes made)
(0 real changes made)
(3972 missing values generated)
(6628 missing values generated)
(2651 real changes made)
(14 real changes made)
(9 missing values generated)
(160 real changes made)
(0 real changes made)
(0 real changes made)
(3967 missing values generated)
(6344 missing values generated)
(2326 real changes made)
(4 real changes made)
(17 missing values generated)
(589 real changes made)
(0 real changes made)
(0 real changes made)
(4014 missing values generated)
(6168 missing values generated)
(2168 real changes made)
(0 real changes made)
(31 missing values generated)
(502 real changes made)
(3 real changes made)
(0 real changes made)
(4013 missing values generated)
(7007 missing values generated)
(2993 real changes made)
(50 real changes made)
(8 missing values generated)
(13 real changes made)
(0 real changes made)
(5 real changes made)
(3969 missing values generated)
(6950 missing values generated)
(2985 real changes made)
(0 real changes made)
(48 real changes made)
(0 real changes made)
(0 real changes made)
(3965 missing values generated)

. 
.         egen activosnegocio= rsum(montoactivoa montoactivob montoactivoc montoactivod montoactiv
> oe montoactivof montoactivog montoactivoh montoactivoi montoactivoj montoactivok montoactivol) i
> f montoactivoa!=. | montoactivob!=. | montoactivoc!=. | montoactivod!=. | montoactivoe!=. | mont
> oactivof!=. | montoactivog!=. | montoactivoh!=. | montoactivoi!=. | montoactivoj!=. | montoactiv
> ok!=. | montoactivol!=.
(3944 missing values generated)

. replace activosnegocio=0 if activosnegocio==.
(3944 real changes made)

. 
. *** Total assets (Business + household)
. 
. gen totalactivos=activos + activosnegocio if activos!=. | activosnegocio!=.

. 
. 
. ************************************************************************************************
> ***********     
. *** 2. Etiquetando vaiables finales
. 
. label var marketing "Indice Practicas Marketing"

. label var stock "Indice Practicas Inventarios"

. label var cost "Indice Practicas de Costo y Registro"

. label var plan "Indice Practicas de Planificacion"

. label var ver_registro "Entrevistador ve libro de registro"

. label var ver_inven "Entrevistador ve Inventarios"

. label var dinero_mano "Dinero a mano para Transacciones"

. label var dependiente "dummy para trabajador dependiente"

. label var independiente "dummy para trabajador independiente"

. label var trabaja "dummy para estar trabajando"

. label var ht "horas semanales trabajadas total"

. label var ylaborales "ingresos laborales"

. label var ydeptes "ingresos provenientes de actividades dependientes"

. label var yindeptes "ingresos provenientes de actividades independientes"

. label var totalactivos "Total assets (Business + household)"

. 
. 
. 
. ************************************************************************************************
> ***********     
. *** 3. Guardando base
.         ** 3.1. Ordeno y guardo base
.         keep id id2010 id2011 orden ind_c2013 sexo edad ydeptes yindeptes ylaborales independien
> te dependiente trabaja marketing stock cost plan tot_pr ver_registro ver_inven dinero_mano ht to
> talactivos

. 
.         sort id orden

.         bysort id : keep if _n== 1
(5632 observations deleted)

. 
.         drop orden

.         sort id

.         
.         save "${path_data}/variables2013", replace
file /Users/pabloguzmanpinto/Dropbox/PAME 3ie/Databases/variables2013.dta saved

.         
. 
. log close
      name:  <unnamed>
       log:  /Users/pabloguzmanpinto/Dropbox/PAME 3ie/Do-files/Logs/6_Prepare variables 2013.log
  log type:  text
 closed on:  14 Dec 2015, 15:30:38
--------------------------------------------------------------------------------------------------
